package BoostedTest::RDBO::ComponentsHasTestplan;

use strict;

use base qw(BoostedTest::RDBO::DB::Object);

__PACKAGE__->meta->setup(
    table   => 'components_has_testplans',

    columns => [
        testplan_id  => { type => 'integer', not_null => 1 },
        component_id => { type => 'integer', not_null => 1 },
    ],

    foreign_keys =>
    [
        component =>
        {
          class       => 'BoostedTest::RDBO::Component',
          key_columns => { component_id => 'id' },
        },

        testplan =>
        {
          class       => 'BoostedTest::RDBO::Testplan',
          key_columns => { testplan_id => 'id' },
        },
   ],

    primary_key_columns => [ 'testplan_id', 'component_id' ],
);

1;

